﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EnCor.Security
{
    public class IdentityMapperCollection
    {
        private List<IIdentityMapper> _List = new List<IIdentityMapper>();
        public IdentityMapperCollection(IList<IIdentityMapper> list)
        {
            foreach (IIdentityMapper mapper in list)
            {
                _List.Add(mapper);
            }
        }

        public IIdentityMapper GetMapper(string mapperName)
        {
            foreach (IIdentityMapper mapper in _List)
            {
                if (mapper.Name == mapperName)
                {
                    return mapper;
                }
            }

            return null;
        }
    }
}
